package com.lyf.scm.admin.domain.remote.stock;

import com.github.pagehelper.PageInfo;
import com.lyf.scm.admin.domain.remote.basedata.dto.StoreDTO;
import com.lyf.scm.admin.domain.remote.stock.dto.RealWarehouseDTO;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 股票中心远程
 *
 * @author wuzhuang
 * @date 2020/07/08
 */
@FeignClient(name = "STOCK-INNER-APP")
public interface StockCenterRemote {

    /**
     * 得到所有仓库
     *
     * @param realWarehouse 实仓
     * @return {@link Response<PageInfo<RealWarehouseDTO>>}
     */
    @PostMapping("/stock/v1/stockQuery/queryRealWarehouseByPage")
    Response<PageInfo<RealWarehouseDTO>> getAllWarehouse(@RequestBody RealWarehouseDTO realWarehouse);

    @GetMapping("/stock/v1/stockQuery/queryFactoryByRwType")
    Response<List<StoreDTO>> queryFactoryByRwType(@RequestParam("realWarehouseType") Integer realWarehouseType);
}
